﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class PropertyOptionElement : SyntaxTreeElement
    {
        private TokenInfo type;
        private ISyntaxTreeElement id;

        public TokenInfo Type { get { return type; } set { type = value; } }
        public ISyntaxTreeElement Id { get { return id; } set { id = value; } }

        public PropertyOptionElement(TokenInfo Type, ISyntaxTreeElement Id, List<TokenInfo> Comments)
            : base(Type, Comments)
        {
            type = Type;
            id = Id;
        }

        public override string ToString()
        {
            return string.Format("{0} {1}", type, id);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return id;
        }
    }
}
